What is Constructor in c#
1841
01-Dec-2015
I want to know what is Constructor and how to use it. please help me.
Anonymous User
01-Dec-2015Constructor is a special method of a class which will invoke automatically whenever instance or object of class is created. Constructors are responsible for object initialization and memory allocation of its class. If we create any class without constructor, the compiler will automatically create one default constructor for that class. There is always at least one constructor in every class.